<?php
require_once ("C_krn_bd.php");
require_once ("C_krn_tools.php");
require_once ("C_krn_exception.php");
global $BD;


echo date('Y-m-d H:m:i',1380281095);


die;
/*

echo $BD->getCountUsuario('admin@imarkket.com');
die;
    
    
    
    global $cAUDIT;
		global $IDIOMA, $language;
		
		$cAUDIT->AddAudit ( AUDIT_EXTEND, __DIR__, __FILE__, __LINE__, __CLASS__, __METHOD__, __FUNCTION__, "::fichero p.php" );
		
		if (isset ( $_POST )) {
			foreach ( $_POST as $clave => $valor ) {
				$cAUDIT->AddAudit ( AUDIT_EXTEND, __DIR__, __FILE__, __LINE__, __CLASS__, __METHOD__, __FUNCTION__, "POST   --> " . $clave . " = " . $valor  );
			}
		}
		if (isset ( $_GET )) {
			foreach ( $_GET as $clave => $valor ) {
				$cAUDIT->AddAudit ( AUDIT_EXTEND, __DIR__, __FILE__, __LINE__, __CLASS__, __METHOD__, __FUNCTION__, "GET    --> " . $clave . " = " . $valor  );
			}
		}
		
		if (isset ( $_SERVER )) {
			foreach ( $_SERVER as $clave => $valor ) { 
				$cAUDIT->AddAudit ( AUDIT_EXTEND, __DIR__, __FILE__, __LINE__, __CLASS__, __METHOD__, __FUNCTION__, "SERVER   --> " . $clave . " = " . $valor  );
			}
		}
/*
$a = array('<foo>',"'bar'",'"baz"','&blong&');

echo "Normal: ",  json_encode($a), "\n";
echo "Tags: ",    json_encode($a, JSON_HEX_TAG), "\n";
echo "Apos: ",    json_encode($a, JSON_HEX_APOS), "\n";
echo "Quot: ",    json_encode($a, JSON_HEX_QUOT), "\n";
echo "Amp: ",     json_encode($a, JSON_HEX_AMP), "\n";
echo "Unicode: ", json_encode($a, JSON_UNESCAPED_UNICODE), "\n";
echo "All: ",     json_encode($a, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE), "\n\n";

$b = array();

echo "Array vacío retornado como array: ", json_encode($b), "\n";
echo "Array vacío retornado como object: ", json_encode($b, JSON_FORCE_OBJECT), "\n\n";

$c = array(array(1,2,3));

echo "Array no asociativo retornado como array: ", json_encode($c), "\n";
echo "Array no asociativo retornado como objeto: ", json_encode($c, JSON_FORCE_OBJECT), "\n\n";

$d = array('foo' => 'bar', 'baz' => 'long');

echo "Array asociativo siempre es retornado como objeto: ", json_encode($d), "\n";
echo "Array asociativo siempre es retornado como objeto: ", json_encode($d, JSON_FORCE_OBJECT), "\n\n";

Normal: ["<foo>","'bar'",""baz\"","&blong&","\u00e9"]
Tags: ["\u003Cfoo\u003E","'bar'","\"baz\"","&blong&","\u00e9"]
Apos: ["<foo>","\u0027bar\u0027","\"baz\"","&blong&","\u00e9"]
Quot: ["<foo>","'bar'","\u0022baz\u0022","&blong&","\u00e9"]
Amp: ["<foo>","'bar'","\"baz\"","\u0026blong\u0026","\u00e9"]
Unicode: ["<foo>","'bar'","\"baz\"","&blong&","é"]
All: ["\u003Cfoo\u003E","\u0027bar\u0027","\u0022baz\u0022","\u0026blong\u0026","é"]

Array vacío retornado como array: []
Array vacío retornado como object: {}

Array no asociativo retornado como array: [[1,2,3]]
Array no asociativo retornado como objeto: {"0":{"0":1,"1":2,"2":3}}

Array asociativo siempre es retornado como objeto: {"foo":"bar","baz":"long"}
Array asociativo siempre es retornado como objeto: {"foo":"bar","baz":"long"}


*/
//[{"logstatus":"0"}] 
		$a = array('logstatus',0);
		$a = '{"pa":"kk","no":"pp","we:":"www","ed":40}';
    echo json_encode($a);

/*


Registration Success Response – Success Code = 1 (User Successfully Stored)

{
    "tag": "register",
    "success": 1,
    "error": 0,
    "uid": "4f074ca1e3df49.06340261",
    "user": {
        "name": "Ravi Tamada",
        "email": "ravi8x@gmail.com",
        "created_at": "2012-01-07 01:03:53",
        "updated_at": null
    }
}
Registration Error Response – Error Code = 1 (Error in storing)

{
    "tag": "register",
    "success": 0,
    "error": 1,
    "error_msg": "Error occured in Registartion"
}
Registration Error Response – Error Code = 2 (User Already Existed)

{
    "tag": "register",
    "success": 0,
    "error": 2,
    "error_msg": "User already existed"
}
Login Success Response – Success Code = 1 (User Logged in)

{
    "tag": "login",
    "success": 1,
    "error": 0,
    "uid": "4f074eca601fb8.88015924",
    "user": {
        "name": "Ravi Tamada",
        "email": "ravi8x@gmail.com",
        "created_at": "2012-01-07 01:03:53",
        "updated_at": null
    }
}
Login Error Response – Error Code = 1 (Login Error – Incorrect username/password)

{
    "tag": "login",
    "success": 0,
    "error": 1,
    "error_msg": "Incorrect email or password!"
}
		*/
		
		
?>
	
